const mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');
mongoose.connect('mongodb://localhost/xiao');
const mySchema  = new mongoose.Schema( {
    cateId:mongoose.Schema.ObjectId,
    userId:mongoose.Schema.ObjectId,
    title:String,
    content:String
});
mySchema.plugin(mongoosePaginate);
const News=mongoose.model('News',  mySchema); 
module.exports=News;